<script setup>
import {ref} from "vue";

let counter = ref(0)

function plus() {
  ++counter.value
}

function minus() {
  --counter.value
}

// let event = ref("click")
let event = ref("dblclick")
</script>

<template>
  <h2>{{counter}}</h2>

  <button @click="minus()">-</button>
  <button @click="plus()">+</button>
  <hr>
  <button @[event]="minus()">-</button>
  <button @[event]="plus()">+</button>

</template>

<style scoped>

</style>